import React from 'react';

import { getEnv } from "@/constants";
import { BasePlayer } from "vendor/components/pro-jessibuca/BasePlayer";
import { ProPlayer } from "vendor/components/pro-jessibuca/ProPlayer";

const Jessibuca: React.FC = () => {
    const staticPublicPath = getEnv().staticPublicPath
    // const playUrl265 = "https://localhost:2020/proxy/ipCameraVideoCollection/mediaServer/live/5101fbc0dfc375b41ef93250cceaef59.live.flv?sk_secret=857985507f1ff55b1bbea8bc2fe803c5";
    const playUrl265 = "wss://localhost:2020/proxy/ipCameraVideoCollection/mediaServer/live/5101fbc0dfc375b41ef93250cceaef59.live.flv?sk_secret=857985507f1ff55b1bbea8bc2fe803c5";
    const playUrl264 = "wss://170.16.0.21:2020/proxy/ipCameraVideoCollection/mediaServer/live/106_s.live.flv?sk_secret=24966a0753a57d7c5bc33298b64cc5b5";


    return <div style={{width: 300, height: 200}}>
        <BasePlayer
            playUrl={playUrl265}
            // playUrl={playUrl264}
            config={{
                decoder: `${staticPublicPath}/jessibuca/base/decoder.js`,
            }}
        />

        {/*<ProPlayer*/}
        {/*    // playUrl={playUrl265}*/}
        {/*    playUrl={playUrl264}*/}
        {/*    config={{*/}
        {/*        // decoder: "/jessibuca/base/decoder.js",*/}
        {/*        // useMSE: false,*/}
        {/*        // useWCS: false,*/}
        {/*        useSIMD: true,*/}
        {/*        // 支持SIMD软解码加速(使用Chrome/Edge 91, Firefox89及之后正式提供的SIMD指令集加速解码, 在1080P以上分辨率带来100%-300%的性能提升)*/}
        {/*        // decoder: "/jessibuca/pro/decoder-pro-simd.js",*/}
        {/*        decoder: `${staticPublicPath}/jessibuca/pro/decoder-pro-simd.js`,*/}
        {/*        // decoder: "/jessibuca/pro/decoder-pro.js",*/}
        {/*    }}*/}
        {/*/>*/}
    </div>
}

export default Jessibuca;